/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufrgs.rescue.model;

import java.io.Serializable;
import java.util.Objects;
import rescuecore2.worldmodel.EntityID;

/**
 *
 * @author rick
 */
public abstract class MyMessage implements Serializable {

    private int id;

    public EntityID getId() {
        return new EntityID(id);
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 67 * hash + Objects.hashCode(this.id);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final MyMessage other = (MyMessage) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }
}
